<template>
	<view class="con">
		<view class="nav">
			<view :class="{'style':type==10}" @click="set(10)">待审核</view>
			<view :class="{'style':type==20}" @click="set(20)">审核通过</view>
			<view :class="{'style':type==30}" @click="set(30)">驳回</view>
			<view :class="{'style':type==40}" @click="set(40)">已打款</view>
		</view>
		<view v-if="list.length>0">
			<view v-for="item in list" class="item">
				<view class="it-t"><text>账号：{{item.alipayAccount}}</text><text>姓名：{{item.alipayName}}</text></view>
				<view v-if="item.rejectReason!=''" class="it-c">驳回理由：{{item.rejectReason}}</view>
				<view class="it-b"><text class="price">提现金额：￥{{item.money}}</text><text class="time">{{$u.timeFormat(item.createTime, 'yyyy-mm-dd hh:MM')}}</text></view>
			</view>
		</view>
		<view v-else class="no">
			暂无数据~~~
		</view>
	</view>
</template>

<script>
	import {zhangdan} from "../../api/user.js"
	export default{
		data(){
			return{
				num:0,
				list:[],
				type:10
			}
		},
		onLoad() {
			this.getInfo()
		},
		onReachBottom() {
			this.getInfo()
		},
		methods:{
			set(e){
				this.type=e
				this.num=0
				this.list=[]
				this.getInfo()
			},
			async getInfo(){
				this.num++;
				let res=await this.get(zhangdan,{type:this.type,pageNum:this.num,pageSize:15})
				res.data.forEach(item=>{
					this.list.push(item)
				})
			}
		}
	}
</script>

<style>
	.no{
		text-align: center;
		margin-top: 400rpx;
	}
	.it-c{
		font-size: 26rpx;
		margin-bottom: 10rpx;
	}
	.time{
		font-size: 26rpx;
	}
	.price{
		color:#E6852C ;
	}
	.it-t{
		display: flex;
		justify-content: space-between;
		margin-bottom: 10rpx;
	}
	.it-b{
		display: flex;
		justify-content: space-between;
	}
	.item{
		padding:10rpx 30rpx;
		background-color: #FFFFFF;
		margin: 10rpx 0;
		font-size: 28rpx;
		color: #666666;
	}
	.style{
		color: #E6852C;
		border-bottom: 4rpx #E6852C solid;
	}
	.nav{
		display: flex;
		align-items: center;
		justify-content: space-around;
		background-color: #FFFFFF;
	}
	page{
		background-color: #F6F6F6
	}
</style>
